﻿
Imports Tools4Fools.Interop
Imports Tools4Fools.Interop.Extensibility
Imports System.Windows.Forms
Imports System.Runtime.InteropServices
Imports Microsoft.VisualBasic
Imports Tools4Fools.Interop.VBAExtensibility
Imports System.Drawing
Imports Microsoft.Office.Core



Module Module1
    Public VBE As VBAExtensibility.VBE

    Public _AddIn As VBAExtensibility.AddIn

    Public TheCommandBar As CommandBar




    Public Function GetCBTop() As Integer
        'GetCBTop = TheCommandBar.Top
        Try
            GetCBTop = VBE.ActiveCodePane.Window.Top
        Catch ex As Exception
            GetCBTop = 30
        End Try


    End Function
    Public Function GetCBLeft() As Integer
        'GetCBLeft = TheCommandBar.Left
        Try
            'Alignment sort of in middel..
            GetCBLeft = VBE.ActiveCodePane.Window.Left

            '  GetCBLeft = VBE.ActiveCodePane.Window.Width
        Catch ex As Exception
            GetCBLeft = 30
        End Try
    End Function

End Module





